package com.softserveinc.interactive_board.validators.form;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotEmpty;

public class RegistrationForm {
	
	public RegistrationForm(String login, String password) {
		super();
		this.login = login;
		this.password = password;
	}
	
	public RegistrationForm() {
		this("login", "password");
	}

	@NotEmpty
	@Size(max = 20)
	@Pattern(regexp = "([A-Z]|[a-z])([A-Z]|[a-z]|[0-9])*")
	private String login;
	
	@NotEmpty
	@Size(max = 20)
	@Pattern(regexp = "([A-Z]|[a-z])([A-Z]|[a-z]|[0-9])*")
	private String password;

	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

}
